<template>
  <div class="header">
    <div class="header-left">
      <i class="back-icon iconfont ">&#xe624;</i>
    </div>
    <div class="header-input">
      <i class="iconfont ">&#xe632;</i>
      输入城市/景点/游玩主题
    </div>
    <router-link to="/city">
      <div class="header-right">
        <span>{{this.city}}</span>
        <i class="iconfont arrow-icon">&#xe64a;</i>
      </div>
    </router-link>
  </div>
</template>

<script type="ecmascript-6">
import { mapState } from 'vuex'
export default{
  name: 'HomeHeader',
  props: {

  },
  computed: {
    ...mapState(['city'])
  }
}

</script>

<style lang="stylus" scoped>
@import '~styles/varibles.styl'
  .header
    display flex
    height $headerHeight
    line-height $headerHeight
    background $bgColor
    color #fff
    .header-left
      width 0.64rem
      float left
      .back-icon
        font-size 0.4rem
        margin 0.12rem
    .header-input
      flex 1
      line-height 0.64rem
      color #cccccc
      height 0.64rem
      margin-top 0.12rem
      padding-left 0.2rem
      margin-left 0.2rem
      background #fff
      border-radius 0.1rem
    .header-right
      min-width 1.04rem
      padding 0 0.1rem
      float right
      text-align center
      font-size 0
      color #fff
      span
        font-size 0.24rem
        margin-right 2px
      .arrow-icon
        font-size 0.24rem

</style>
